<?php

namespace App\Http\Validate\Purchase;

use App\Http\Validate\BaseValidate;

/**
 * 权限组验证器
 */
class StockAllotOrder extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct()
    {
        $this->rule = [
            'stock_id'=>'required',
            'count' => 'required|integer|gt:0',
        ];
        $this->message = [
            'stock_id.required' => '库存信息未选择',
            'count.required' => '订单件数不能为空',
            'count.integer' => '订单件数不可小于0',
            'count.gt' => '订单件数不可小于0',
        ];
    }
}
